package com.engine4cloud.tdf.supervision.dto.update;

import com.engine4cloud.tdf.supervision.dto.JzdxFileDTO;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 外出申请信息采集表
 *
 * @author wenjie
 * @date 2024-04-08 14:33:54
 */
@Data
@Schema(description = "外出申请信息-请求对象")
public class SpOutApplicationUpdateDTO implements Serializable {

    /**
     * 主键
     */
    @Schema(description = "主键")
    @NotNull(message = "主键不能为空")
    private Long id;

    /**
     * 申请时间
     */
    @Schema(description = "申请时间")
    @NotNull(message = "申请时间不能为空")
    private LocalDateTime sqsj;

    /**
     * 外出目的地明细
     */
    @Schema(description = "外出目的地明细", example = "绿竹村向阳巷")
    @NotBlank(message = "外出目的地明细不能为空")
    private String wcmddmx;

    /**
     * 外出理由
     */
    @Schema(description = "外出理由", example = "考驾照")
    @NotBlank(message = "外出理由不能为空")
    private String wcly;

    /**
     * 外出天数
     */
    @Schema(description = "外出天数", example = "2.5")
    @NotNull(message = "外出天数不能为空")
    private BigDecimal wcts;

    /**
     * 外出开始时间
     */
    @Schema(description = "外出开始时间", example = "2024-01-01 00:00:00")
    @NotNull(message = "外出开始时间不能为空")
    private LocalDateTime ksqr;

    /**
     * 外出结束时间
     */
    @Schema(description = "外出结束时间", example = "2024-01-10 00:00:00")
    @NotNull(message = "外出结束时间不能为空")
    private LocalDateTime jsrq;

    /**
     * 固定居住地
     */
    @Schema(description = "外出目的地", example = "[\"460000\",\"46000A\",\"469006\",\"36327\"]")
    @NotEmpty(message = "外出目的地不能为空")
    @Size(min = 2, message = "外出目的地必须至少选两级")
    private List<String> destinationList;

    /**
     * 文书材料
     */
    @Schema(description = "法律文书", example = """
            [{"name": "张三.png",
            "url": "/supervision/oss-file/oss/file?fileName=09468fc20f2544e28891a058858fdf58.jpeg"}
            ]""")
    @NotEmpty(message = "相关法律文书材料不能为空")
    private List<JzdxFileDTO> instrumentList;

}